<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="description" content="A Modern Back-end Management System" />
    <meta name="keywords" content="Vben Admin Vue3 Vite" />
    <meta name="author" content="Vben" />
    <meta
        name="viewport"
        content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
    />
    <!-- 由 vite 注入 VITE_APP_TITLE 变量，在 .env 文件内配置 -->
    <title>lowcode</title>
    <script>
        var __BUILD_TIME__ = '1731124568175';
        (function () {
            const regex = /<!--{{(\d*)}}-->/;
            window.fetch('?t=' + Date.now()).then(async (res) => {
                const content = await res.text();
                if (content) {
                    const result = content.match(regex);
                    if (result && result[1]) {
                        if (result[1] !== __BUILD_TIME__) {
                            top.location.reload(true);
                        }
                    }
                }
            });
        })();
    </script>
    <link rel="icon" href="./favicon.ico" />
    <script type="module" crossorigin src="./assets/index-BLrNih-l.js"></script>
    <link rel="modulepreload" crossorigin href="./assets/@vtj-base-DVglhWTu.js">
    <link rel="modulepreload" crossorigin href="./assets/@vtj-core-C6O6SoFL.js">
    <link rel="modulepreload" crossorigin href="./assets/@vtj-utils-CTf98zY5.js">
    <link rel="modulepreload" crossorigin href="./assets/vue-DiYDnmzS.js">
    <link rel="modulepreload" crossorigin href="./assets/vue-router-bCglXMsE.js">
    <link rel="modulepreload" crossorigin href="./assets/@element-plus-icons-vue-BOU_-H7d.js">
    <link rel="modulepreload" crossorigin href="./assets/@vtj-icons-DFTjHo90.js">
    <link rel="modulepreload" crossorigin href="./assets/shared-CUMIZayx.js">
    <link rel="modulepreload" crossorigin href="./assets/dayjs-DzmFq6fg.js">
    <link rel="modulepreload" crossorigin href="./assets/vxe-DKt6hztg.js">
    <link rel="modulepreload" crossorigin href="./assets/lodash-es-iLqVnzBD.js">
    <link rel="modulepreload" crossorigin href="./assets/@vueuse-BNYHKXJq.js">
    <link rel="modulepreload" crossorigin href="./assets/@sxzz-popperjs-es-egqNnATr.js">
    <link rel="modulepreload" crossorigin href="./assets/element-plus-DJ_s4iSc.js">
    <link rel="modulepreload" crossorigin href="./assets/@vtj-ui-DAqsDnwJ.js">
    <link rel="modulepreload" crossorigin href="./assets/@vtj-renderer-Di2JP7k6.js">
    <link rel="modulepreload" crossorigin href="./assets/@vtj-web-BReJ-zYo.js">
    <link rel="stylesheet" crossorigin href="./assets/@vtj-web-Ul4_lDMe.css">
    <link rel="stylesheet" crossorigin href="./assets/index-L5wi16TA.css">

    <style>
        .dark {
            background-color: #141414;
        }
        #vtj-ide-loading {
            width: 400px;
            height: 100px;
            position: fixed;
            left:50%;
            top: 50%;
            transform: translate(-50%,-50%);
            z-index: 9999;
            border-radius: 4px;
            background-color: rgba(255,255,255,0.1);
            box-shadow: 0 0 10px rgba(0,0,0,0.2);
            padding: 20px;
            font-size: 12px;
            box-sizing: border-box;
        }
        .vtj-ide-loading__bar {
            height: 14px;
            border-radius: 4px;
            margin-top: 10px;
            border: 1px solid #eee;
            overflow: hidden;
        }
        .vtj-ide-loading__title {
            display: flex;
            justify-content: space-between;
        }
        .dark .vtj-ide-loading__title {
            color:#fff;
        }
        .vtj-ide-loading__value {
            display: block;
            height: 100%;
            background-color: #409eff;
            border-radius: 4px;
            font-size: 0;
        }
    </style>
</head>
<body>
<div id="vtj-ide-loading">
    <div class="vtj-ide-loading__title"><span>正在加载资源.... </span><span id="vtj-ide-loading-count"></span></div>
    <div class="vtj-ide-loading__bar">
        <span class="vtj-ide-loading__value" id="vtj-ide-loading-value" style="width:0%"></span>
    </div>
</div>

<div id="root"></div>

<script>
    (function(){
        var loading = document.querySelector('#vtj-ide-loading');
        var countEl = document.querySelector('#vtj-ide-loading-count');
        var valueEl = document.querySelector('#vtj-ide-loading-value');
        var links = document.querySelectorAll('link,script');
        var total = links.length;
        var setValue = function(current) {
            countEl.innerHTML = current + '/' +total;
            valueEl.style.width = (current * 100 / total) + '%';
            if(!total || current === total) {
                setTimeout(function() {
                    loading.parentNode.removeChild(loading);
                    loading = null;
                    countEl = null;
                    valueEl = null;
                }, 100);
            }
        }

        var current = 0;
        links.forEach(function(link) {
            link.onload = function() {
                ++current;
                setValue(current);
                link.onload = null;
            }
        })
        window.addEventListener('load',function() {
            current = total
            setValue(current)
        });

    })()

</script>

</html>
